#include <bits/stdc++.h>
using namespace std;

char buf[(int)5e7], *fs = buf;

inline int gn() {
    int k = 0;
    char c = *fs++;
    for (; !isdigit(c); c = *fs++);
    for (; isdigit(c); c = *fs++) k = k * 10 + c - '0';
    return k;
}

const int maxn = 100003;

struct edge {
    int to;
    edge *ne;
    edge(int to, edge *ne) : ne(ne), to(to) {}
}*head[maxn];

void addedge(int fr, int to) {
    head[fr] = new edge(to, head[fr]);
}

bool vis[maxn];
int ind[maxn], otd[maxn];

void dfs(int x) {
    for (edge *e = head[x]; e; e = e->ne) {
        if (vis[e->to]) {
            puts("-1\n");
            exit(0);
        } else {
            vis[e->to] = 1;
            dfs(e->to);
            vis[e->to] = 0;
        }
    }
}

priority_queue<int, vector<int>, greater<int> > q;

int n, m ;

int main() {
    freopen("dictionary.in", "r", stdin);
    freopen("dictionary.out", "w", stdout);
    fread(buf, 1, (int)5e7, stdin);
    n = gn(), m = gn();
    for (int i = 1, a, b; i <= m; i++) {
        a = gn(), b = gn();
        ind[b]++;
        otd[a]++;
        addedge(a, b);
    }
    for (int i = 1; i <= n; i++) 
        if (!vis[i]) dfs(i);
    for (int i = 1; i <= n; i++) 
        if (!ind[i]) q.push(i);
    while (!q.empty()) {
        int x = q.top();
        q.pop();
        cout << x << ' ';
        for (edge *e = head[x]; e; e = e->ne) {
            ind[e->to]--;
            if (!ind[e->to]) 
                q.push(e->to);
        }
    }
}
